Ext.define('TS.model.rp.ContactBalanceModel',{
	extend: 'Ext.data.Model',	
	fields: [
	    {name:'id',type:'int'},
	    {name:'direct',type:'int'},
	    {name:'fyear',type:'int'},
	    {name:'period',type:'int'},
	    {name:'custSuppId',type:'int'},
	    {name:'deptId',type:'int'},
	    {name:'empId',type:'int'},
	    {name:'beginAmount',type:'float'},
	    {name:'debitAmount',type:'float'},
	    {name:'creditAmount',type:'float'},
	    {name:'endAmount',type:'float'},
	    {name:'yearDebitAmount',type:'float'},
	    {name:'yearCreditAmount',type:'float'}
	],
	associations:[
	        	  {type: 'hasOne',model: 'TS.model.base.CustomerModel',associatedName:'customer',associationKey:'customer'},
	        	  {type: 'hasOne',model: 'TS.model.base.DeptModel',associatedName: 'dept',associationKey:'dept'},
	        	  {type: 'hasOne',model: 'TS.model.base.EmpModel',associatedName: 'emp',associationKey:'emp'}
	]
});